package com.example.demo3;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class DemoTest {

    public static void main(String[] args) {

        // 模拟使用 spring中 发布订阅的机制
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext("com.example.demo3");

        Request request = (Request) context.getBean("request");
        request.doRequest();

    }
}
